class Commodity {
  int commodityId;
  String commodityName;
  String commodityDescribe; //描述
  String commodityImg;
  String commodityImgMedium;
  String commodityImgBig;
  String commodityOriginalPrice;
  String commodityDiscountPrice;
  String commodityCreateTime;

  int categoryId;
  int categorySubId;

  String commodityImg1;
  String commodityImg2;
  String commodityImg3;
  String commodityImg4;

  String commodityImgDetails1;
  String commodityImgDetails2;
  String commodityImgDetails3;
  String commodityImgDetails4;

  Commodity({
    this.commodityId,
    this.commodityName,
    this.commodityDescribe,
    this.commodityImg,
    this.commodityImgMedium,
    this.commodityImgBig,
    this.commodityOriginalPrice,
    this.commodityDiscountPrice,
    this.commodityCreateTime,
    this.categoryId,
    this.categorySubId,
    this.commodityImg1,
    this.commodityImg2,
    this.commodityImg3,
    this.commodityImg4,
    this.commodityImgDetails1,
    this.commodityImgDetails2,
    this.commodityImgDetails3,
    this.commodityImgDetails4,
  });

  Map toJson() {
    Map map = new Map();
    map["commodityId"] = this.commodityId;
    map["commodityName"] = this.commodityName;
    map["commodityDescribe"] = this.commodityDescribe;
    map["commodityImg"] = this.commodityImg;
    map["commodityImgMedium"] = this.commodityImgMedium;
    map["commodityImgBig"] = this.commodityImgBig;
    map["commodityOriginalPrice"] = this.commodityOriginalPrice;
    map["commodityDiscountPrice"] = this.commodityDiscountPrice;
    map["commodityCreateTime"] = this.commodityCreateTime;
    map["categoryId"] = this.categoryId;
    map["categorySubId"] = this.categorySubId;
    map["commodityImg1"] = this.commodityImg1;
    map["commodityImg2"] = this.commodityImg2;
    map["commodityImg3"] = this.commodityImg3;
    map["commodityImg4"] = this.commodityImg4;
    map["commodityImgDetails1"] = this.commodityImgDetails1;
    map["commodityImgDetails2"] = this.commodityImgDetails2;
    map["commodityImgDetails3"] = this.commodityImgDetails3;
    map["commodityImgDetails4"] = this.commodityImgDetails4;
    return map;
  }

  factory Commodity.fromJson(dynamic json) {
    return Commodity(
        commodityId: json['commodityId'],
        commodityName: json['commodityName'],
        commodityDescribe: json['commodityDescribe'],
        commodityImg: json['commodityImg'],
        commodityImgMedium: json['commodityImgMedium'],
        commodityImgBig: json['commodityImgBig'],
        commodityOriginalPrice: json['commodityOriginalPrice'],
        commodityDiscountPrice: json['commodityDiscountPrice'],
        commodityCreateTime: json['commodityCreateTime'],
        categoryId: json['categoryId'],
        categorySubId: json['categorySubId'],
        commodityImg1: json['commodityImg1'],
        commodityImg2: json['commodityImg2'],
        commodityImg3: json['commodityImg3'],
        commodityImg4: json['commodityImg4'],
        commodityImgDetails1: json['commodityImgDetails1'],
        commodityImgDetails2: json['commodityImgDetails2'],
        commodityImgDetails3: json['commodityImgDetails3'],
        commodityImgDetails4: json['commodityImgDetails4']);
  }
}
